#pragma once
#ifndef __NEZHACMEMORYWRITEFILE_H__
#define __NEZHACMEMORYWRITEFILE_H__

#include "NezhaIWriteFile.h"
#include "NezhaOS.h"

#include <vector>

namespace Nezha
{
	namespace stream
	{
		
		class CMemoryWriteFile: public IWriteFile
		{
		public:
		CMemoryWriteFile(std::size_t initialSize = 0);
		
		virtual int write(const void* buffer, u32 sizeToWrite);
		virtual void flush();
		virtual bool seek(long finalPos, bool relativeMovement = false);
		virtual long getPos() const;
		virtual const char* getFileName() const;
		virtual const char* getFullPath() const;

		const u8* getBuffer() const;
		std::size_t getBufferSize() const;
		private:

		long mCurrPos;
		PArray<u8> mBuffer;

		};
	};
};
#endif // __NEZHACMEMORYWRITEFILE_H__